# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: psykose <alice@ayaya.dev>
pkgname=py3-colorlog
_pyname=colorlog
pkgver=6.6.0
pkgrel=0
pkgdesc="formatter for use with Python's logging module"
url="https://github.com/borntyping/python-colorlog"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/c/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver

replaces="py-colorlog" # Backwards compatibility
provides="py-colorlog=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	cd "$builddir"/colorlog/tests
	PYTHONPATH="$builddir"/build/lib py.test-3
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
8c8bdfcfe537dc34c145fbfb9ebd0399184e3a8ab0e4bccc2e61d52a323c1372c60757cac2b023c9d39eb3c9fcf191b50c8cd4d089941aa484b30170a3cd1389  colorlog-6.6.0.tar.gz
"
